<?php

require_once('include/MySugarApplication.php');
session_start();
unset($_SESSION["sugar_soap_proxy"]);

?>
<!DOCTYPE HTML SYSTEM "http://www.bitzermobile.com/bitzer/dtd/HTML401-loose-bitzer.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="bitzer-page-type" content="login">
<?php
	if (!$isBitzer) {
		echo '
        <title>Sugar Login</title>
        <LINK REL=StyleSheet HREF="',$app->appRoot,'include/style.css" TYPE="text/css" MEDIA=screen>
        <script type="text/javascript" src="',$app->appRoot,'include/niftycube.js"></script>
        <script type="text/javascript">
            window.onload=function(){
				setAppRoot("',$app->appRoot,'");
                Nifty("div#container");
                Nifty("div#content,div#nav","same-height small");
                Nifty("div#header,div#loginFooter","small");
                Nifty("ul.postnav a","transparent");
				setWidth("div#container", "400px");
				setWidth("div#content", "400px");
				setWidth("div#footer", "400px");
            }
        </script>';
	} else {
		echo '<title></title>';
	}
?>
    </head>
    <body>
<?php
	if (!$isBitzer) {
		echo '   
        <div id="container">
            <div id="header"><h1>My Sugar Login</h1></div>
            <div id="content">
                <h3>Please enter login info.</h3>';
	}
?>
                <form name="Login"
                      data-bitzer-login-form="true"
                      action="include/processLogin.php" method="post"
                      enctype="application/x-www-form-urlencoded"
                      data-bitzer-session-cookie-1="PHPSESSID">
<?php
	if (!$isBitzer) {
		echo '
				<table class="form" width="100%" align="center">
                        <tr>
                            <th width="27%">
                                <div align="left">
                       				User Name
								</div>
                            </th>
                            <td>';
	}
?>
                                <input data-bitzer-username="true"
                                       type="text" name="username"
                                       size="25"
                                       maxlength="50"
                                       value="demo"
                                       id="username" >
<?php
	if (!$isBitzer) {
		echo ' 
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <div align="left">
                                    Password
                                </div>
                            </th>
                            <td>';
	}
?>
                                <input data-bitzer-password="true"
                                       type="password" name="password"
                                       size="25"
                                       maxlength="50"
                                       value="demo" >
<?php
	if (!$isBitzer) {
?>
                            </td>
                        </tr>
                     </table>
                    <br>
                    <table>
                        <tr><td>
                                <ul class="postnav">
                                    <li><a href="javascript:document.Login.submit();">Login</a></li>
                                </ul>
                            </td>
                            
                        </tr>
                    </table>
<?php
}
?>
                </form>
<?php
	if (!$isBitzer) {
?>
            </div>
            <div id="footer"></div>
        </div>
<?php
	}
?>
    </body>
</html>
